import { useRouter, useDidShow } from '@tarojs/taro'
import { useEffect } from 'react'
import { View } from '@tarojs/components'
import { PostCard } from '../../components/index'

import './index.styl'

export default function Post() {
  const router = useRouter()
  const { params } = router
  useEffect(() => {
    console.log(router)
  }, [])
  useDidShow(() => {
    console.log('onShow')
  })
  return (
    <View className='post'>
      <PostCard title={params.title} content={params.content} />
    </View>
  )
}
